count occurrences of character in string python 3